print("this is test2!");

function fact(n)
	if (n==0) then
		return 1
	else
		return n*fact(n-1)
	end	
end

function getMin_Max(array)
	local min = 10000000
	local max = -10000000
	for i,v in ipairs(array) do
		if v < min then
			min = v;
		elseif v > max then
			max = v;
		end
	end
	return min, max;
end

local min, max = getMin_Max({2,6,4,7,9,5});
print(min .. " " .. max);

function sum( ... )
	local sum = 0;
	for i,v in ipairs(...) do
		sum = sum + v;
	end
	return sum;
end

print(sum({2,3,4,5,6}));
